home *** CD-ROM | disk | FTP | other *** search
- /*
- ** vputca.c
- **
- ** Pictor, Version 1.51, Copyright (c) 1992-94 SoftCircuits
- ** Redistributed by permission.
- */
-
- #include "pictor.h"
-
- /*
- ** Writes a character/attribute to the current video position.
- */
- void vputca(int value)
- {
- _asm mov di,_PL_offset
- _asm mov ax,_PL_segment
- _asm mov es,ax
- _asm mov ax,value
- _asm cmp _PL_snowcheck,FALSE
- _asm je direct
- _asm mov bx,ax
- _asm mov dx,CGA_STATUS_PORT
- scan_lo:
- _asm in al,dx
- _asm shr al,1
- _asm jc scan_lo
- _asm cli
- scan_hi:
- _asm in al,dx
- _asm shr al,1
- _asm jnc scan_hi
- _asm xchg ax,bx
- _asm stosw
- _asm sti
- _asm jmp end_vputca
- direct:
- _asm stosw
- end_vputca:
- _asm mov _PL_offset,di
-
- } /* vputca */
-